package com.gz.dto;

import java.math.BigDecimal;
import java.util.Date;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.StringUtils;

/**
 * (TestPaper)实体参数类
 *
 * @author jhk
 * @since 2024-06-24 00:49:47
 */
@Data
@ApiModel("TestPaper实体参数类")
public class TestPaperDto extends PageInfoDto implements Serializable {
    private static final long serialVersionUID = 280515703501381612L;
    private Integer id;
    @ApiModelProperty("科目")
    private String subject;
    @ApiModelProperty("学层")
    private String level;
    @ApiModelProperty("年级")
    private String grade;
    @ApiModelProperty("题目数量")
    private Integer questionCount;
    @ApiModelProperty("选择题数量")
    private Integer chooseCount;
    @ApiModelProperty("填空题数量")
    private String fillCount;
    @ApiModelProperty("出卷老师")
    private String creatTeacher;
    @ApiModelProperty("未确定临时字段一")
    private String tempField1;
    @ApiModelProperty("未确定临时字段二")
    private String tempField2;
    @ApiModelProperty("创建人id")
    private Integer crtId;
    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date crtDt;
    @ApiModelProperty("更新人id")
    private Integer optId;
    @ApiModelProperty("更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date optDt;
    @ApiModelProperty("卷子状态（0:未发卷，1:已发卷，2:已批卷）")
    private Integer status;
    @ApiModelProperty("1:老师定卷 2:AI定卷")
    private Integer paperType;
    @ApiModelProperty("卷子总分")
    private Double totalScore;
    @ApiModelProperty("已录入题目数量")
    private Integer enteredQtCnt;
    @ApiModelProperty("剩余录入题目数量")
    private Integer leftPosCnt;
    @ApiModelProperty("试卷名称")
    private String paperName;
    @ApiModelProperty("开考时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date startDoTime;
    @ApiModelProperty("考试时长，分钟为单位")
    private Double dueTime;
    @ApiModelProperty("排序字段")
    private String orderField;
    @ApiModelProperty("排序类型")
    private String orderType;
    @ApiModelProperty("答对得分")
    private BigDecimal rightScore;
    @ApiModelProperty("空答得分")
    private BigDecimal emptyScore;
    @ApiModelProperty("答错得分")
    private BigDecimal wrongScore;

    public String getOrderField() {
        if (!StringUtils.isEmpty(orderField)) {
            return com.gz.utils.DataFmtUtil.xX2x_x(orderField);
        }
        return orderField;
    }
}

